Streaming live or prerecorded video to client devices such as set-top boxes, computers, smartphones, mobile devices, tablet computers, gaming consoles, and other devices over networks such as the internet has become increasingly popular. Delivery of such video commonly relies on adaptive bitrate streaming technologies such as HTTP Live Streaming (HLS), HTTP Dynamic Streaming (HDS), Smooth Streaming, and MPEG-DASH.
Adaptive bitrate streams are often segmented such that client devices can transition between different variants of a video stream at segment boundaries, depending on factors such as network conditions and the receiving client device's processing capacity. For example, a video can be encoded at a high quality level using a high bitrate, at a medium quality level using a medium bitrate, and at a low quality level using a low bitrate. Each alternative variant of the video stream can be listed on a playlist such that the client devices can request segments from the most appropriate variant for current conditions. A client device that initially requested segments from a high quality variant when it had sufficient available bandwidth for that variant can switch to requesting segments from a lower quality variant when the its available bandwidth decreases.
A client device generally has a buffer so that it can download video data into the buffer, and then extract the video data from the buffer for decoding and playback. When an entire segment is downloaded into a client device's buffer before playback reaches the end of that segment, the client device can request the next segment from the same or a different variant based on current network conditions. However, if network conditions deteriorate while the client device is downloading a segment such that the client device plays all the video data available in the buffer before additional video data can be downloaded, the client device can experience a buffer underrun.
In many adaptive bitrate streaming solutions a client device pauses video playback when it experiences a buffer underrun. The client device then waits until enough additional video data has been received in the buffer to allow it to begin playback again. If the client device waits too long to resume playback, the buffering delay can interrupt the viewing experience and frustrate users. However, if the client device does not wait long enough, or if network conditions change such that the client device plays back buffered video data of a segment faster than it downloads remaining portions of that segment, the client device can be forced to again pause playback and further buffer additional data within the same segment. Starting and stopping video playback for buffering multiple times within the same segment can be annoying for viewers and further deteriorate the viewing experience.
What is needed is a system for minimizing the number of playback pauses that occur due to buffer underruns within a single segment of an adaptive bitrate streaming variant, while also minimizing the length of such pauses.